# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-future
_pkgname=future
pkgver=0.18.2
pkgrel=3
pkgdesc='Clean single-source support for Python 3 and 2.'
url='https://pypi.org/project/future/#files'
arch=('any')
license=('MIT')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('91c025f7d94bcdf93df838fab67053165a414fc84e8496f92ecbb910dd55f6b6af5e360bbd051444066880c5a6877e75157bd95e150ead46e5c605930dfc50f2')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  mv "$pkgdir/usr/bin/futurize" "$pkgdir/usr/bin/futurize2"
  mv "$pkgdir/usr/bin/pasteurize" "$pkgdir/usr/bin/pasteurize2"
}

